
package callback;


public class A implements call_back{

    private B b;
		
    public A (B b) {
	this.b = b;
    }

    public void ask(String question) {
	new Thread(new Runnable() {
            @Override
            public void run() {
		b.answerQuestion(A.this, question);
            }
	}).start(); 
    }
    
    @Override
    public void solve(String s) {
        System.out.println("答案是：" + s);
    }
}
